package phone.qyg.com.qyg.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.base.tool.BaseActivity;
import com.app.utils.OptionImageUtils;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

import phone.qyg.com.qyg.R;
import phone.qyg.com.qyg.model.Base;

/**
 * 作者：lblbh on 2018/1/18 14:44
 * 邮箱：lanbuhan@163.com
 * 功能：图片文件查看
 */
@ContentView(R.layout.culture_file_img)
public class CultureFileImgLookActivity extends BaseActivity {

    @ViewInject(R.id.back)
    TextView back;

    @ViewInject(R.id.img)
    ImageView img;

    Base base;
    @Override
    public void initSucessView() {
        base = (Base) getTransModels();
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        back.setText(setAttributeText(base.title));
        setImgPath(base.url,img, OptionImageUtils.getRectRatio43());
    }

    @Event(value = {R.id.back})
    private void viewOnClik(View v){
        switch (v.getId()){
            case R.id.back:
                this.finish();
                break;
        }
    }

    @Override
    public void initViewHandler() {

    }
}
